﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>设备维护保养项目库</title>
        <%@ include file="../jslib/jquerylib.jsp" %>
         <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jqGrid/css/jqgrid.css"></link>
	    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/lhgdialog/lhgcore.lhgdialog.min.js?skin=mac"></script>
	     <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js" defer="defer"></script>
        <link href="<%=request.getContextPath() %>/web/style/layout.css" type="text/css" rel="stylesheet"/>
        <link rel="stylesheet" href="<%=request.getContextPath() %>/jslib/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css"/>
        <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/ztree/jquery.ztree.core-3.4.js"></script>
        <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
	       <!-- 删除结果信息返回 -->
	    	<c:if test="${requestScope.message!=null}">
				<script type="text/javascript">
	  	 		     alert('<c:out value="${requestScope.message}"></c:out>');
	  	 		     window.close();
	  			</script>
	        </c:if>
        <script type="text/javascript">
            var treeObj;
            var flag = "1";
            var delflag = "1";
            var chaflag = "1";
            var orgParentId = "";
            var tree_sel=null;
            var common_contextPath="<%=common_contextPath%>";
            var common_basePath="<%=common_basePath%>";
            var common_width = window.screen.width-100;
            var common_height = window.screen.height-420;
            $(document).ready(function(){
            	//高级搜索需要的js
				 buttonStatus=1;
				 $("#flip").click(function(){
					if(buttonStatus==1){
						$("#panel").slideToggle("slow");
						$("#flip").toggleClass("btnStatus2");
						buttonStatus=1;
					}
					else{
						$("#panel").slideUp("slow");
						$("#flip").toggleClass("btnStatus2");
					}
			     });
				  
				 //高级搜索结束
				 $("#gridTable").jqGrid({
						url:'<%=request.getContextPath()%>/wbxm!searchShebei.action',
						datatype: "json",
						height: 479,
						width: 510,
						autowidth: true,
						 colNames:['ID','设备名称','维护保养项目','维护保养基准','测量变量的方法','操作要点'],
		                 colModel:[
		                     {name: 'ID', index: 'ID',width:60,  key:true, sorttype:"int",hidden:true,hidedlg:true},
		                     {name: 'SHBEINAME', index: 'SHBEINAME', width:100},
		                     {name: 'WEIBAOXIANGMU', index: 'WEIBAOXIANGMU', width:100},
		                     {name: 'WEIBAOJIZHUN', index: 'WEIBAOJIZHUN', width:250},
		                     {name: 'FANGFA', index: 'FANGFA', width:220,hidden:true}, 
		                     {name: 'CAOZUOYAODIAN', index: 'CAOZUOYAODIAN', width:340,hidden:true}
		                    
		                 ],   
						shrinkToFit:false,
					//	autoScroll: true,
						sortname:'id',
						sortorder:'desc',
						viewrecords:true,
						multiselect: true, // 是否显示复选框
						multiboxonly : true, 
						rownumbers: true,//显示行号
						editable:true, 
					//	rowNum:<%=session.getAttribute("SYS_PAGECOUNT")%>,
						rowList:[15,20,30,50,200,500],
						toolbar: [false,"top"],
						jsonReader: {
							root:"rows",		// 数据行（默认为：rows）
							page: "page",  	// 当前页
							total: "total",  // 总页数
							records: "records",  // 总记录数
							repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
						}, 
						prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
						pager:"#gridPager",
						caption: "保养项目列表"
					});
				});
         
                         
            //--查询名称 高亮 开始---------------------------------------------------------------------
            function focusKey(e) {
                if (key.hasClass("empty")) {
                    key.removeClass("empty");
                }
            }
            function blurKey(e) {
                if (key.get(0).value === "") {
                    key.addClass("empty");
                }
            }
            var lastValue = "", nodeList = [], fontCss = {};
            
            function searchNode(e) {
                var zTree = $.fn.zTree.getZTreeObj("tree");
                var value = $.trim(key.get(0).value);
                var keyType = "";
                keyType = "name";
                if (lastValue === value) return;
                lastValue = value;
                if (value === "") return;
                updateNodes(false);
                nodeList = zTree.getNodesByParamFuzzy(keyType, value);
                updateNodes(true);
    
            }
            function updateNodes(highlight) {
            
                var zTree = $.fn.zTree.getZTreeObj("tree");
                for( var i=0, l=nodeList.length; i<l; i++) {
                    nodeList[i].highlight = highlight;
                    zTree.updateNode(nodeList[i]);
                }
            }
            function getFontCss(treeId, treeNode) {
                return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
            }
            function filter(node) {
                return !node.isParent && node.isFirstNode;
            }
    
            var key;
            $(document).ready(function(){
            	$.ajax({   
			        async : false,   
			        cache:false,   
			        type: 'POST',   
			       dataType : "json",   
			        url: '<%=request.getContextPath()%>/wbxm!queryDataBySql.action',
			       error: function () {//请求失败处理函数   
			            alert('请求失败');   
			        },   
			        success:function(data){ //请求成功后处理函数。     
			          //  alert(data);   
			            zNodes = data;   //把后台封装好的简单Json格式赋给zNodes   
			        }   
			    });
                $.fn.zTree.init($("#tree"), setting, zNodes);
                key = $("#key");
                key.bind("focus", focusKey)
                .bind("blur", blurKey)
                .bind("propertychange", searchNode)
                .bind("input", searchNode); 
            });
            //--查询名称 高亮 结束---------------------------------------------------------------------
                
            <%
            //  String parentId = "";
        //	String taijiaId = "" ;
        //	String taijiaName = "";
        //	String treeNode = "";
        	//Shebeiweibao sw = Shebeiweibao();
     	//	ApplicationContext context =WebApplicationContextUtils.getWebApplicationContext(application);
     	//	SheBeiWeiBaoXiangMuKuAction Shebeibaoyangku = (SheBeiWeiBaoXiangMuKuAction)context.getBean("wbxmAction");
     	//	String sqlname = " select distinct t.WBK_SHEBEINAME from GWM_SHEBEIWEIBAOXIANGMUKU t  where  1=1";
			//String sqlname = " select distinct t.id,t.shebeiname from gwm_shebeiweibao t  where  1=1";
		///	List list =Shebeibaoyangku.queryDataBySql(sqlname);
		//	if(null!=list&&list.size()>0){
    	//		treeNode +="{\"id\":\"设备维护保养项目库\",\"pId\":\"设备维护保养项目库\",\"name\":\"设备维护保养项目库\",\"title\":\"设备维护保养项目库\",\"open\":true},"; 
    	//	for(int i=0;i<list.size();i++){
        //         if(null!=list.get(i)){
        //        	 Object[]obj = (Object[])list.get(i);
        //           //  String node = obj[0]!=null?obj[0].toString():"";
        //             if(obj[0]!=null){
         //            String shebeiname = (String)obj[0];
        // /          //  treeNode +="{\"id\":\""+node+"\",\"pId\":\"设备维护保养项目库\",\"name\":\""+shebeiname+"\",\"title\":\""+node+"\",\"open\":false},";  
        //             treeNode +="{\"pId\":\"设备维护保养项目库\",\"name\":\""+shebeiname+"\",\"title\":\""+""+"\",\"open\":false},";  
        //             }
        //          }
        //      }
    	//	}
    		
    	//	String newTreeNode=treeNode.substring(0,treeNode.length()-1);   
       //     System.out.println(newTreeNode);
            %>
            var setting = {
                treeId:'tree',
                callback: {
                        onClick: zTreeOnClick,
                     //   beforeCollapse: beforeCollapse,
                     //   beforeExpand: beforeExpand,
                     //   onCollapse: onCollapse,
                    //    onExpand: onExpand
                    },
                view: {
                    selectedMulti: false
                },
                data: {
                    key: {
                        title: "name"
                    },
                    simpleData: {
                        enable: true,
                        idKey: "id",
                        pIdKey: "pId",
                        rootPId: -1
                    }
                                
                },
                view: {
                    fontCss: getFontCss
                }
            };
            function zTreeOnClick(event, treeId, treeNode) {
            	//alert(treeNode.id);
                tree_sel = treeNode;
                var id=treeNode.name;
                
                 var params = {  
                	"id" : encodeURIComponent(id)
           	 	};
                 var postData = $("#gridTable").jqGrid("getGridParam", "postData");
	             $.extend(postData, params);  //(9)将postData中的查询参数覆盖为空值
             
	            jQuery("#gridTable").jqGrid('setGridParam',
	            {
	                url:'<%=request.getContextPath()%>/wbxm!searchShebei.action'
	            }).trigger("reloadGrid", [{page:1}]); 
            };

           // var zNodes=[{"id":"设备维护保养项目库","pId":"设备维护保养项目库","name":"设备维护保养项目库","title":"设备维护保养项目库","open":true},
          //              {"id":"设备1","pId":"设备维护保养项目库","name":"设备1","title":"设备1","open":false},
          //              {"id":"设备2","pId":"设备维护保养项目库","name":"设备2","title":"设备2","open":false},
          //              {"id":"设备3","pId":"设备维护保养项目库","name":"设备3","title":"设备3","open":false} 
           //             ];
             var zNodes;
            function showIconForTree(tetid, treeNode) {
                return !treeNode.isParent;
            };
            //展开/关闭按钮 开始-----------------------------------------------------------------------
            var log, className = "dark";
            function beforeCollapse(treeId, treeNode) {
                className = (className === "dark" ? "":"dark");
                showLog("[ "+getTime()+" beforeCollapse ]&nbsp;&nbsp;&nbsp;&nbsp;" + treeNode.name );
                return (treeNode.collapse !== false);
            }
            function onCollapse(event, treeId, treeNode) {
                showLog("[ "+getTime()+" onCollapse ]&nbsp;&nbsp;&nbsp;&nbsp;" + treeNode.name);
            }       
            function beforeExpand(treeId, treeNode) {
                className = (className === "dark" ? "":"dark");
                showLog("[ "+getTime()+" beforeExpand ]&nbsp;&nbsp;&nbsp;&nbsp;" + treeNode.name );
                return (treeNode.expand !== false);
            }
            function onExpand(event, treeId, treeNode) {
                showLog("[ "+getTime()+" onExpand ]&nbsp;&nbsp;&nbsp;&nbsp;" + treeNode.name);
            }
            function showLog(str) {
                if (!log) log = $("#log");
                log.append("<li class='"+className+"'>"+str+"</li>");
                if(log.children("li").length > 8) {
                    log.get(0).removeChild(log.children("li")[0]);
                }
            }
            function getTime() {
                var now= new Date(),
                h=now.getHours(),
                m=now.getMinutes(),
                s=now.getSeconds(),
                ms=now.getMilliseconds();
                return (h+":"+m+":"+s+ " " +ms);
            }
    
            function expandNode(e) {
                var zTree = $.fn.zTree.getZTreeObj("tree"),
                type = e.data.type,
                nodes = zTree.getSelectedNodes();
                if (type.indexOf("All")<0 && nodes.length == 0) {
                    alert("请先选择一个父节点");
                }
    
                if (type == "expandAll") {
                    zTree.expandAll(true);
                } else if (type == "collapseAll") {
                    zTree.expandAll(false);
                } else {
                    var callbackFlag = $("#callbackTrigger").attr("checked");
                    for (var i=0, l=nodes.length; i<l; i++) {
                        zTree.setting.view.fontCss = {};
                        if (type == "expand") {
                            zTree.expandNode(nodes[i], true, null, null, callbackFlag);
                        } else if (type == "collapse") {
                            zTree.expandNode(nodes[i], false, null, null, callbackFlag);
                        } else if (type == "toggle") {
                            zTree.expandNode(nodes[i], null, null, null, callbackFlag);
                        } else if (type == "expandSon") {
                            zTree.expandNode(nodes[i], true, true, null, callbackFlag);
                        } else if (type == "collapseSon") {
                            zTree.expandNode(nodes[i], false, true, null, callbackFlag);
                        }
                    }
                }
            }
            //展开/关闭按钮  结束---------------------------------------------------------------------
            $(document).ready(function(){
                treeObj = $.fn.zTree.init($("#tree"), setting, zNodes);
                $("#expandAllBtn").bind("click", {type:"expandAll"}, expandNode);
                $("#collapseAllBtn").bind("click", {type:"collapseAll"}, expandNode);
                
            }); 
            //ajax方法删除
           function deleteWbxm(){
        	   var epName="";
               if(tree_sel!=null){
        	      epName=tree_sel.id;
               }
        	   var ids = $("#gridTable").jqGrid("getGridParam", "selarrrow") + "";
       	    if (!ids) {
       	    alert("请先选择记录!");  
       	       return false;  
       		} 
       		if(!confirm("是否确认删除 ？")){
       		   return false;
       		}
       		 var params = {  
       			        "ids": ids
       			    };  
       		var actionUrl = "<%=request.getContextPath() %>/wbxm!deleteShebeiwbxm.action?ids="+ids;  
       		$.ajax({  
       			  url : actionUrl,  
       		      type : "post", 
       		      data : params,  
       		      dataType : "json",  
       		      cache : false,  
       		      error : function(textStatus, errorThrown) {  
       		          alert("系统ajax交互错误: " + textStatus.value);  
       		      },  
       		      success : function(data, textStatus) {
       		      	if(data.result=='success'){
       		      		alert("删除成功！");       
       		      		refresh(epName);
       		      	    location.reload();     
       		      	}else{
       		      		alert("删除失败！");
       		      	}
       		    }  
       		});
            }
           //删除设备
           function deleteEP(){
        	   if(tree_sel!=null){
         	      epName=tree_sel.id;
         	     var params = {  
        			        "epName": epName
            			        //encodeURIComponent(encodeURIComponent(epName))
        			    };
         	    if(!confirm("是否确认删除 ？")){
            		   return false;
            		}  
        		var actionUrl = "<%=request.getContextPath() %>/wbxm!deleteEP.action";  
        		$.ajax({  
        			  url : actionUrl,  
        		      type : "post", 
        		      data : params,  
        		      dataType : "json",  
        		      cache : false,  
        		      error : function(textStatus, errorThrown) {  
        		          alert("系统ajax交互错误: " + textStatus.value);  
        		      },  
        		      success : function(data, textStatus) {
        		      	if(data.result=='success'){
        		      		alert("删除成功！");       
        		      		location.reload();    
        		      	}else{
        		      		alert("删除失败！");
        		      	}
        		    }  
        		});
                }
        	   else{
        		   alert("请选择设备！");
        		   return false;
        	   }
           }
        
	        //新建
	        function addWbxm(){
	        	if(tree_sel==null){
					alert("请选择相应树节点进行添加");
				}else{
				    // var name=encodeURIComponent(encodeURIComponent(tree_sel.name));
				     var id =encodeURIComponent(encodeURIComponent(tree_sel.id));
				     var epName=tree_sel.id;
		            $.dialog({
					        id:'cerify',
					        title:'设备保养信息添加', 
					        content: 'url:'+ '<%=request.getContextPath() %>/wbxm!gotoAddwbxm.action?id='+id+'&temp='+Math.round(Math.random()*10000),
					        okVal:false,//确定按钮文字
					        cancelVal:false,//取消按钮文字
					        min:true, //是否显示最小化按钮
					        max:false,//是否显示最大化按钮
					        fixed:false,//开启静止定位
					        lock:true,//开启锁屏
					        focus:true,//弹出窗口后是否自动获取焦点（4.2.0新增）
					        time:null,//设置对话框显示时间
					        resize:true,//是否允许用户调节尺寸
					        drag:true,//是否允许用户拖动位置
					        cache:false,//是否缓存iframe方式加载的窗口内容页
					        width: '550px',
					        height: 500,
					        close: function(){
					        	refresh(epName);
			             }
			        });
		         }
	        }
	        //修改
	        function updateWbxm(){
	        	var ids= $("#gridTable").jqGrid("getGridParam", "selarrrow") + "";
				if (!ids) {
				    alert("请先选择记录!");  
				    return false;  
				}
				if(ids.indexOf(",")!=-1){
					  alert("只能选择一条记录!");  
				        return false; 
				}
				var row = jQuery("#gridTable").jqGrid('getRowData',ids);//获取选中行.
				var id = row.ID;//获取选中行的id属性.
				var epName="";
	               if(tree_sel!=null){
	        	      epName=tree_sel.id;
	               }
				$.dialog({
			        title: '设备维保项目信息修改',
			        content: 'url:'+ '<%=request.getContextPath() %>/wbxm!gotoUpdateWbxm.action?id='+id+'&temp='+Math.round(Math.random()*10000),
			        okVal: false,//确定按钮文字
			        cancelVal: false,//取消按钮文字
			        min: true, //是否显示最小化按钮
			        max: false,//是否显示最大化按钮
			        fixed: false,//开启静止定位
			        lock: true,//开启锁屏
			        focus: true,//弹出窗口后是否自动获取焦点（4.2.0新增）
			        time: null,//设置对话框显示时间
			        resize: true,//是否允许用户调节尺寸
			        drag: true,//是否允许用户拖动位置
			        cache: false,//是否缓存iframe方式加载的窗口内容页
			        width: '550px',
			        height: 500,
			        close: function(){
		        	refresh(epName);
                  }
				});
	        }
	      //查看详细
	        function queryWbxm(){
	        	var ids= $("#gridTable").jqGrid("getGridParam", "selarrrow") + "";
				if (!ids) {
				    alert("请先选择记录!");  
				    return false;  
				}
				if(ids.indexOf(",")!=-1){
					  alert("只能选择一条记录!");  
				        return false; 
				}
				var row = jQuery("#gridTable").jqGrid('getRowData',ids);//获取选中行.
				var id = row.ID;//获取选中行的id属性.
				var epName="";
	               if(tree_sel!=null){
	        	      epName=tree_sel.id;
	               }
				$.dialog({
			        title: '设备维保项目详细查看',
			        content: 'url:'+ '<%=request.getContextPath() %>/wbxm!gotoViewWbxm.action?id='+id+'&temp='+Math.round(Math.random()*10000),
			        okVal: false,//确定按钮文字
			        cancelVal: false,//取消按钮文字
			        min: true, //是否显示最小化按钮
			        max: false,//是否显示最大化按钮
			        fixed: false,//开启静止定位
			        lock: true,//开启锁屏
			        focus: true,//弹出窗口后是否自动获取焦点（4.2.0新增）
			        time: null,//设置对话框显示时间
			        resize: true,//是否允许用户调节尺寸
			        drag: true,//是否允许用户拖动位置
			        cache: false,//是否缓存iframe方式加载的窗口内容页
			        width: '550px',
			        height: 500
				});
	        }
	            //添加设备
	            function addEP(){
	            	 $.dialog({
					        id:'cerify',
					        title:'设备添加', 
					        content: 'url:'+ '<%=request.getContextPath() %>/wbxm!gotoAddEP.action?temp='+Math.round(Math.random()*10000),
					        okVal:false,//确定按钮文字
					        cancelVal:false,//取消按钮文字
					        min:true, //是否显示最小化按钮
					        max:false,//是否显示最大化按钮
					        fixed:false,//开启静止定位
					        lock:true,//开启锁屏
					        focus:true,//弹出窗口后是否自动获取焦点（4.2.0新增）
					        time:null,//设置对话框显示时间
					        resize:true,//是否允许用户调节尺寸
					        drag:true,//是否允许用户拖动位置
					        cache:false,//是否缓存iframe方式加载的窗口内容页
					        width: '550px',
					        height: 100,
					        close: function(){
					        	location.reload(); 
			             }
			        });
	            }
	             //导入
	             function importWbxm(){
	            	var type="wbxm!importExcelData.action";
	     			var sURL="shebeiweibaoxiangmu_import.jsp?type="+type;
	     	   		window.showModalDialog(sURL,"","dialogWidth=430px;dialogHeight=150px;dialogLeft:400xp;dialogTop:15xp");
	     	   	    location.reload(); 
	     		}
	             
	       

	           //刷新
	           function refresh(){
	            jQuery("#gridTable").jqGrid('setGridParam',
	                    {
	            			url:'<%=request.getContextPath()%>/wbxm!searchShebei.action'
	                    }).trigger("reloadGrid", [{page:1}]); 
	            }
	           function refresh(id){
	        	//tree_sel = treeNode;
                //  var id=treeNode.name;
                
                 var params = {  
                	"id" : encodeURIComponent(id)
           	 	 };
                 var postData = $("#gridTable").jqGrid("getGridParam", "postData");
	             $.extend(postData, params);  //(9)将postData中的查询参数覆盖为空值
             
	            jQuery("#gridTable").jqGrid('setGridParam',
	                    {
	            			url:'<%=request.getContextPath()%>/wbxm!searchShebei.action'
	                    }).trigger("reloadGrid", [{page:1}]); 
	        }
         </script>
    </head>
<body>
        	<div>
       		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
			    <td align="right" height="9" class="sclinebotBg"></td>
			  </tr>
			  <tr>
			    <td height="10" align="right"></td>
		      </tr>
			</table>
       	</div>
    <table width="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
                <td height="379" width="260" valign="top" style="background: #FFFFFF; border: #aaaaaa solid 1px;">
					<div style="font-size:13px;height:30px;padding-top:5px;padding-left:5px;background-image: url(img/tree_l_sc_bg.gif);background-repeat:repeat-x;">设备名称检索：
						<input type="text" id="key" name="organization.orgName" value="" class="empty" style="width:150px; height:16px; line-height:20px;"  />
					</div>
					<div style="font-size:13px;height:30px;padding-top:5px;padding-left:5px;background-image: url(img/tree_l_sc_bg.gif);background-repeat:repeat-x;">
						<input id="addEP" type='button' value='添加设备' onclick="addEP()" class='button_b' />
						<input id="addEP" type='button' value='删除设备' onclick="deleteEP()" class='button_b' />
					</div>
                    <div style="background-image: url('<%=request.getContextPath() %>/jslib/ztree/img/titlie.gif'); background-repeat:repeat-x;height: 20px; width: 265px; padding-top:5px;"> 
                       
                        <span >
                            <img onclick="return false;" src="<%=request.getContextPath() %>/jslib/ztree/img/add.png"  alt="闭合" title="点击关闭所有节点" id="collapseAllBtn"/>
                        </span> 
                        <span >
                            <img onclick="return false;"  src="<%=request.getContextPath() %>/jslib/ztree/img/delete.gif" alt="展开" title="点击展开所有节点"  id="expandAllBtn"/>
                        </span>
                    </div>
                    <div
                        style="WIDTH: 265px; HEIGHT: 480px; OVERFLOW: auto; scrollbar-3dlight-color: #595959; scrollbar-arrow-color: #FFFFFF; scrollbar-base-color: #CFCFCF; scrollbar-darkshadow-color: #FFFFFF; scrollbar-face-color: #CFCFCF; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #595959">
                        <div id="treeList" class="dtree">
                            <ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
                        </div>
                    </div>
                </td>
                <td valign="top" style="padding-left:10px;">
                    <table width="100%" height="0" border="0" cellpadding="0" cellspacing="0" >
                        <tr>
                            <td height="30" valign="top"> 
                                <input id="addWbxm" type='button' value='添 加' onclick="addWbxm()" class='button_b' />
			                    <input id="editWbxm" type='button' value='修 改' onclick="updateWbxm()" class='button_b' />
			                    <input id="queryWbxm" type='button' value='查 看' onclick="queryWbxm()" class='button_b' />
			                    <input id="delWbxm" type='button' value='删 除' onclick='deleteWbxm()' class='button_b' />
			                     <input id="importWbxm" type='button' value='导 入' onclick='importWbxm()' class='button_b' />
                        </tr>
                        <tr>
                            <td>                   
                                <table id="gridTable" style="width:100%;"></table>
                                <div id="gridPager"   style="width:683px;"></div>
                            </td>
                        </tr>
                  </table>
                </td>
      </tr>
</table>
</body>
</html>